Repository navigation
Remove redundant helpers, dead code, and single-use indirection - #1341
Merged
Merged
Conversation
Gee's to_array()/add_all_array() and Vala's implicit array duplication already provide the defensive copies the provider models made by hand, and Vala's `in` operator replaces five private array-contains loops in the launch-options editor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Delete unused Models.Steam (SteamLibraryConfig, LibraryFolder). - Inline TinkerGameContext into InstallJob.tinker_game_install_location. - Fold InstallationLifecycleRecorder into a virtual no-op on InstallationOperationCoordinator, dropping three `as` casts. - Share immutable VariantDefinition objects instead of rebuilding them on every get_variants () call. - Drop run_command_sync (duplicate of run_command_sync_result), the convert_bytes_to_string and Asset.is_archive_name pass-throughs, two never-observed signals, and commented-out code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Quinta <112334784+Quinta0@users.noreply.github.com>
The web merge of main left provider-definition.vala calling the removed copy_strings helper and reintroduced copy_variants; the new downloads presentation test still called convert_bytes_to_string. Treat the new legacy_titles and ReleaseVariantSet code the same way as the rest of the branch: share immutable VariantDefinition objects, rely on Vala array duplication, and drop the now-unused VariantDefinition.copy (). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
I will take a look in a few hours. |
Keep the TinkerGame destination in the existing install location. Require successful host command execution before reporting a Flatpak dependency as present, and cover the failure cases with a fixture.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and change
The provider models and launch-options editor hand-rolled array copies and
array-contains loops that Gee and Vala already provide, and an
over-engineering pass found dead classes, unobserved signals, and single-use
indirection. This PR removes them without changing behavior.
Stdlib/native replacements
to_array ()/add_all_array ()and Vala's implicit array duplication.The generated C still emits
_vala_array_dupin owned getters, so callerskeep receiving defensive copies.
Vala's
inoperator.Dead code and indirection
Models.Steam(SteamLibraryConfig,LibraryFolder).TinkerGameContextintoInstallJob.tinker_game_install_location.InstallationLifecycleRecorderinto a virtual no-op onInstallationOperationCoordinator, removing threeascasts.VariantDefinitionobjects instead of rebuilding them onevery
get_variants ()call, including the newReleaseVariantSet, anddrop the now-unused
VariantDefinition.copy (). Arrays are still copied.run_command_sync(duplicate ofrun_command_sync_result), theconvert_bytes_to_string(→GLib.format_size) andAsset.is_archive_namepass-throughs, two signals nothing connects to,and commented-out code.
Net: about 160 fewer lines. The branch is merged with current
main(#1337, #1339). A micro-benchmark shows providerdefinition reads ~10× faster and
ProviderRegistryconstruction ~18% faster.Startup, test runtime, and clean build time are unchanged within noise, so
the benefit is mainly less code to maintain.
Validation
./scripts/check.shon the branch merged with currentmain: compile,12/12 Meson suites (670 unit subtests), and
git diff --checkall pass.main: tool install/update, download size andspeed labels, launch-options editor toggles/preview/Apply, and header back
navigation behave and look the same as before. No UI change, so no
screenshot.
restart flows.
Maintenance impact
src/models/steam/*,src/services/tinker-game-context.vala); ran./scripts/build.sh translationsto refreshpo/POTFILESand the POTtemplate. No translatable strings changed.
TinkerGameContextreference indocs/provider-architecture.md.🤖 Generated with Claude Code